package com.hecate.common.db.basedao.delete;

import com.hecate.common.db.basedao.provider.delete.HecateBaseDeleteProvider;
import com.hecate.common.db.basedo.IBase;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.annotation.RegisterMapper;

import java.util.List;

/**
 * 根据bid集合删除记录
 *
 * @author 黄星星
 * @date 2020-12-17
 */
@RegisterMapper
public interface HecateDeleteByBidListDao<T extends IBase> {

    /**
     * 根据主键字符串进行删除，类中只有存在一个带有@Id注解的字段
     *
     * @param cid
     * @param bidList
     * @return
     */
    @DeleteProvider(type = HecateBaseDeleteProvider.class, method = "dynamicSQL")
    int deleteByBidList(@Param("cid") Long cid, @Param("bidList") List<String> bidList);
}
